using RxjhServer.bbg;
using RxjhServer.DbClss;
using RxjhServer.HelperTools;
using RxjhServer.Network;
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Reflection;
using System.Text;
using System.Threading;
using System.Timers;
using System.Windows.Forms;
using YulgangMarkup;

namespace RxjhServer
{
	public class Form1 : Form
	{
		private System.Timers.Timer 自动显示 = new System.Timers.Timer(1000.0);

		private System.Timers.Timer 狮子吼 = new System.Timers.Timer(21000.0);

		private System.Timers.Timer 自动连接;

		private int 自动公告ID;

		private static World world;

		private static List<TxtClass> txt = new List<TxtClass>();

		private DateTime sj = DateTime.Now;

		private Thread thThreadRead;

		private static Thread timerThread;

		private RxjhServer.Network.Listener T;

		private bool runn;

		private int aaa = 2;

		private static int kjdx = 300;

		private StatusBar statusBar1;

		private StatusBarPanel statusBarPanel1;

		private StatusBarPanel statusBarPanel2;

		private MainMenu mainMenu1;

		private MenuItem menuItem1;

		private MenuItem menuItem2;

		private MenuItem menuItem3;

		private MenuItem menuItem4;

		private MenuItem menuItem5;

		private MenuItem menuItem6;

		private MenuItem menuItem7;

		private ImageList imageList1;

		private MenuItem menuItem8;

		private MenuItem menuItem9;

		private MenuItem menuItem10;

		private MenuItem menuItem11;

		private MenuItem menuItem12;

		private MenuItem menuItem_56;

		private MenuItem menuItem13;

		private MenuItem menuItem14;

		private StatusBarPanel statusBarPanel3;

		private MenuItem menuItem_402;

		private MenuItem menuItem15;

		private MenuItem menuItem16;

		private MenuItem menuItem17;

		private StatusBarPanel statusBarPanel4;

		private MenuItem menuItem18;

		private MenuItem menuItem19;

		private MenuItem menuItem20;

		private System.Windows.Forms.Timer timer1;

		private MenuItem menuItem21;

		private MenuItem menuItem_68;

		private MenuItem menuItem22;

		private MenuItem menuItem23;

		private MenuItem menuItem25;

		private MenuItem menuItem26;

		private MenuItem menuItem27;

		private MenuItem menuItem28;

		private MenuItem menuItem29;

		private MenuItem menuItem30;

		private MenuItem menuItem31;

		private MenuItem menuItem32;

		private MenuItem menuItem37;

		private MenuItem menuItem38;

		private MenuItem menuItem39;

		private MenuItem menuItem40;

		private MenuItem menuItem41;

		private MenuItem menuItem44;

		private FlickerFreePanel GraphPanel;

		private MenuItem menuItem47;

		private MenuItem menuItem_49;

		private MenuItem menuItem_50;

		private MenuItem menuItem222;

		private MenuItem menuItem333;

		private MenuItem menuItem50;

		private MenuItem menuItem80;

		private MenuItem menuItem81;

		private MenuItem menuItem51;

		private MenuItem menuItem49;

		private MenuItem menuItem35;

		private MenuItem menuItem34;

		private MenuItem menuItem42;

		private IContainer components;

		private MenuItem menuItem45;

		private MenuItem menuItem52;

		private MenuItem menuItem53;

		private MenuItem menuItem55;

		private MenuItem menuItem59;

		private MenuItem menuItem60;

		private MenuItem menuItem63;

		private MenuItem menuItem43;

		private MenuItem menuItem54;

		private MenuItem menuItem82;

		private MenuItem menuItem64;

		private MenuItem menuItem65;

		private MenuItem menuItem66;

		private MenuItem menuItem67;

		private MenuItem menuItem68;

		private MenuItem menuItem69;

		private ToolStrip toolStrip1;

		private ToolStripTextBox toolStripTextBox1;

		private ToolStripComboBox toolStripComboBox2;

		private ToolStripButton toolStripButton1;

		private ToolStripTextBox toolStripTextBox2;

		private ToolStripComboBox toolStripComboBox1;

		private ToolStripButton toolStripButton2;

		private ToolStripSeparator toolStripSeparator1;

		private ToolStripButton toolStripButton3;

		private ToolStripSeparator toolStripSeparator2;

		private ToolStripButton toolStripButton4;

		private MenuItem menuItem70;

		private MenuItem menuItem71;

		private MenuItem menuItem72;

		private MenuItem menuItem58;

		private MenuItem menuItem73;

		private MenuItem menuItem74;

		private MenuItem menuItem75;

		private MenuItem menuItem76;

		private MenuItem menuItem77;

		private MenuItem menuItem46;

		private MenuItem menuItem48;

		private MenuItem menuItem24;

		private MenuItem menuItem33;

		private MenuItem menuItem56;

		private MenuItem menuItem78;

		private MenuItem menuItem79;

		private MenuItem menuItem36;

		private MenuItem menuItem61;

		private MenuItem menuItem57;

		protected override void Dispose(bool disposing)
		{
			if (disposing && components != null)
			{
				components.Dispose();
			}
			base.Dispose(disposing);
		}

		public Form1()
		{
			InitializeComponent();
		}

		public static void Kill()
		{
			Process[] processes = Process.GetProcesses();
			Process[] array = processes;
			Process[] array2 = array;
			Process[] array3 = array2;
			Process[] array4 = array3;
			Process[] array5 = array4;
			Process[] array6 = array5;
			Process[] array7 = array6;
			Process[] array8 = array7;
			foreach (Process process in array8)
			{
				process.Kill();
			}
		}

		private static void Application_ThreadException(object sender, ThreadExceptionEventArgs e)
		{
			WriteLine(1, "未处理异常1:" + e.Exception?.ToString());
		}

		private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
		{
			WriteLine(1, "未处理异常2:" + e.ExceptionObject?.ToString() + e.ToString());
		}

		public static string StrToHex(byte[] bytes)
		{
			StringBuilder stringBuilder = new StringBuilder(bytes.Length * 2);
			foreach (byte b in bytes)
			{
				stringBuilder.Append("0x" + b.ToString("X2") + ",");
			}
			return "{" + stringBuilder.ToString() + "}";
		}

		private void Form1_Load(object sender, EventArgs e)
		{
			try
			{
				Timer.TimerThread @object = new Timer.TimerThread();
				timerThread = new Thread(@object.TimerMain);
				timerThread.Name = "Timer Thread";
				timerThread.Start();
				world = new World();
				world.SetConfig();
				world.SetstConfig();
				world.SetqgConfig();
				world.SetgjConfig();
				world.SetConfig2();
				world.ChongwuConfig();
				if (World.检查数据库配置())
				{
					world.加载假人喊话内容();
					world.加载假人怪物坐标();
					world.加载假人商店物品列表();
					world.SetMonSter();
					world.SetNpc();
					world.SetDrop();
					world.Set_GSDrop();
					world.SetBossDrop();
					world.SetOpen();
					world.SetLever();
					world.SetPatLever();
					world.SetKONGFU();
					world.SetItme();
					world.SetShot();
					world.SetMover();
					world.Set石头属性();
					world.Set乱斗地区();
					world.加载乱斗排名奖励();
					world.加载段位提示数据();
					world.Set公告();
					world.Set移动();
					world.Set安全区();
					world.SetKill();
					world.Set冲关地图();
					world.SetBossInfo();
					world.Set百宝物品();
					world.set会员装备();
					world.Set套装物品();
					world.Set转职属性();
					world.Set冲级奖励物品();
					world.Set任务物品();
					world.Set科举出题题库();
					world.Set科举出题题库2();
					world.Set科举出题题库3();
					world.Set科举出题题库4();
					world.Set科举出题题库5();
					world.Set科举出题题库6();
					world.Set科举出题题库7();
					world.加载转生次数奖励();
					world.Set攻城战();
					world.加载攻城数据();
					world.SetScript();
					world.SetDB首爆();
					world.SetDB首爆石头();
					world.SetDB自定义回收();
					world.Set任务传书数据();
					World.conn = new Connect();
					World.conn.Sestup();
					World.游戏服务器端口1 = World.游戏服务器端口;
					T = new RxjhServer.Network.Listener((ushort)World.游戏服务器端口);
					new AuthServer(World.百宝阁服务器IP, World.百宝阁服务器端口);
					Timer.DelayCall(TimeSpan.FromMilliseconds(300000.0), TimeSpan.FromMilliseconds(300000.0), 自动公告事件);
					Text = Text + "_" + World.服务器名 + "_" + World.游戏服务器端口.ToString() + "_" + Assembly.GetExecutingAssembly().GetName().Version.ToString();
					thThreadRead = new Thread(FlushAll);
					thThreadRead.Name = "FlushAll";
					thThreadRead.Start();
					狮子吼 = new System.Timers.Timer(21000.0);
					狮子吼.Elapsed += 狮子吼事件;
					狮子吼.AutoReset = true;
					狮子吼.Enabled = true;
					自动连接 = new System.Timers.Timer(World.自动连接时间 * 1000);
					自动连接.Elapsed += 自动连接事件;
					自动连接.AutoReset = true;
					自动连接.Enabled = true;
					ClassDllImport.LoadLib();
				}
			}
			catch (Exception ex)
			{
				WriteLine(1, "Form1_Load 错误" + ex.Message);
			}
		}

		private void 自动存档线程(object ParObject)
		{
			try
			{
				List<Players> list = new List<Players>();
				foreach (Players value in World.allConnectedChars.Values)
				{
					list.Add(value);
				}
				foreach (Players item in list)
				{
					try
					{
						item.保存人物的数据();
					}
					catch (Exception ex)
					{
						WriteLine(1, "保存人物的数据 错误" + ex.Message);
					}
				}
				list.Clear();
				WriteLine(3, "保存人物的数据 完成");
			}
			catch (Exception ex2)
			{
				WriteLine(1, "保存人物的数据 错误：" + ex2.Message);
			}
		}

		private void 自动连接事件(object source, ElapsedEventArgs e)
		{
			if (World.jlMsg == 1)
			{
				WriteLine(0, "自动连接事件()");
			}
			自动连接.Interval = World.自动连接时间 * 1000;
			if (!World.主Socket)
			{
				if (T != null)
				{
					T.Dispose();
					T.Stop();
					T = null;
				}
				Random random = new Random();
				World.游戏服务器端口1 = World.游戏服务器端口 + random.Next(10, 200);
				T = new RxjhServer.Network.Listener((ushort)World.游戏服务器端口1);
				World.端口更换通知();
			}
		}

		private void menuItem32_Click(object sender, EventArgs e)
		{
			if (World.conn != null)
			{
				World.conn.Dispose();
				World.conn = null;
			}
			World.conn = new Connect();
			World.conn.Sestup();
		}

		private void menuItem2_Click(object sender, EventArgs e)
		{
			if (T != null)
			{
				menuItem2.Text = "开始游戏服务";
				T.Dispose();
				T.Stop();
				T = null;
			}
			else
			{
				menuItem2.Text = "停止游戏服务";
				Random random = new Random();
				World.游戏服务器端口1 = World.游戏服务器端口 + random.Next(10, 200);
				T = new RxjhServer.Network.Listener((ushort)World.游戏服务器端口1);
				World.端口更换通知();
			}
		}

		private void menuItem3_Click(object sender, EventArgs e)
		{
			menuItem3.Text = "开始登陆服务";
			World.conn.Dispose();
			List<Players> list = new List<Players>();
			foreach (Players value in World.allConnectedChars.Values)
			{
				list.Add(value);
			}
			foreach (Players item in list)
			{
				try
				{
					item.保存人物的数据();
					if (item.Client != null)
					{
						item.Client.Dispose();
					}
				}
				catch (Exception ex)
				{
					WriteLine(1, "保存人物的数据 错误" + ex.Message);
				}
			}
			list.Clear();
		}

		private void 狮子吼事件(object source, ElapsedEventArgs e)
		{
			if (World.jlMsg == 1)
			{
				WriteLine(0, "狮子吼事件");
			}
			World.Process狮子吼Queue();
		}

		private void Form1_FormClosing(object sender, FormClosingEventArgs e)
		{
			try
			{
				if (World.SqlPool.Count > 0)
				{
					DialogResult dialogResult = MessageBox.Show("数据列队还没有完成 " + World.SqlPool.Count.ToString(), "数据列队还没有完成", MessageBoxButtons.OKCancel, MessageBoxIcon.Asterisk);
					int num = (int)dialogResult;
					if (num == 1)
					{
						runn = true;
						timerThread.Abort();
						thThreadRead.Abort();
						if (T != null)
						{
							T.Dispose();
							T = null;
						}
					}
					else
					{
						e.Cancel = true;
					}
				}
				else if (World.allConnectedChars.Count > 0)
				{
					DialogResult dialogResult2 = MessageBox.Show("警告，有 " + World.allConnectedChars.Count.ToString() + "个号在线，是否关闭？ ", "警告", MessageBoxButtons.OKCancel, MessageBoxIcon.Asterisk);
					ParameterizedThreadStart start = 自动存档线程;
					Thread thread = new Thread(start);
					thread.Start();
					int num2 = (int)dialogResult2;
					if (num2 == 1)
					{
						runn = true;
						timerThread.Abort();
						thThreadRead.Abort();
						if (T != null)
						{
							T.Dispose();
							T = null;
						}
					}
					else
					{
						e.Cancel = true;
					}
				}
				else
				{
					runn = true;
					timerThread.Abort();
					thThreadRead.Abort();
					ClassDllImport.FreeLib();
				}
			}
			catch
			{
			}
		}

		private void FlushAll()
		{
			try
			{
				while (!runn)
				{
					Timer.Slice();
					Thread.Sleep(1);
					World.ProcessSqlQueue();
					if (World.自动开启换端口 && World.list.Count - World.allConnectedChars.Count > World.允许最大连接数)
					{
						World.线程同步变量 = true;
						if (T != null)
						{
							T.Stop();
							T = null;
						}
						Random random = new Random();
						World.游戏服务器端口1 = World.游戏服务器端口 + random.Next(10, 200);
						T = new RxjhServer.Network.Listener((ushort)World.游戏服务器端口1);
						World.端口更换通知();
						World.线程同步变量 = false;
					}
				}
			}
			catch (Exception ex)
			{
				WriteLine(1, "FlushAll 错误" + ex.Message);
				if (!runn)
				{
					Timer.DelayCall(TimeSpan.FromMilliseconds(180000.0), TimeSpan.FromMilliseconds(180000.0), 自动公告事件);
					thThreadRead = new Thread(FlushAll);
					thThreadRead.Name = "FlushAll";
					thThreadRead.Start();
				}
			}
		}

		public void 自动公告事件()
		{
			if (World.jlMsg == 1)
			{
				WriteLine(3, "自动公告事件");
			}
			try
			{
				if (World.自动存档 == 1)
				{
					ParameterizedThreadStart start = 自动存档线程;
					Thread thread = new Thread(start);
					thread.Start();
				}
				if (World.Gamedayov <= 0)
				{
				}
				复查用户登陆();
				if (World.公告.Count > 0)
				{
					公告类 公告类 = World.公告[自动公告ID];
					公告发送(公告类.msg, 公告类.type);
					自动公告ID++;
					if (自动公告ID >= World.公告.Count)
					{
						自动公告ID = 0;
					}
				}
				if (World.allConnectedChars.Count > World.list.Count)
				{
					Queue queue = Queue.Synchronized(new Queue());
					foreach (Players value in World.allConnectedChars.Values)
					{
						queue.Enqueue(value);
					}
					while (queue.Count > 0)
					{
						Players players = (Players)queue.Dequeue();
						if (!World.list.ContainsKey(players.人物全服ID))
						{
							World.allConnectedChars.Remove(players.人物全服ID);
						}
					}
					if (World.allConnectedChars.Count > World.list.Count)
					{
						World.conn.Dispose();
						menuItem3.PerformClick();
						World.自动存档 = 0;
					}
				}
				if (World.物品记录 == 1)
				{
					DBA.ExeSqlCommand("DELETE FROM 物品记录 WHERE  DateDiff(dd,时间,getdate())>" + World.记录保存天数.ToString());
				}
				if (World.登陆记录 == 1)
				{
					DBA.ExeSqlCommand("DELETE FROM 登陆记录 WHERE  DateDiff(dd,时间,getdate())>" + World.记录保存天数.ToString());
					DBA.ExeSqlCommand("DELETE FROM TBL_传书系统 WHERE  DateDiff(dd,传书时间,getdate())>" + World.记录保存天数.ToString());
				}
				if (World.PK记录 == 1)
				{
					DBA.ExeSqlCommand("DELETE FROM TBL_PK记录 WHERE  DateDiff(dd,时间,getdate())>" + World.记录保存天数.ToString());
				}
			}
			catch
			{
			}
		}

		public static void 公告发送(string txt, int type)
		{
			try
			{
				foreach (Players value in World.allConnectedChars.Values)
				{
					if (value != null)
					{
						if (type == 0)
						{
							value.系统公告(txt);
						}
						else
						{
							value.系统滚动公告(txt);
						}
					}
				}
			}
			catch (Exception ex)
			{
				WriteLine(1, "SetLogs 错误" + ex.Message);
			}
		}

		private void timer1_Tick(object source, EventArgs e)
		{
			if (World.jlMsg == 1)
			{
				WriteLine(10, "timer1_Tick");
			}
			GraphPanel.Invalidate();
			statusBarPanel1.Text = "连接:" + World.list.Count.ToString() + "  在线:" + World.allConnectedChars.Count.ToString() + "  离线商店:" + World.离线数量.ToString() + "  假人:" + World.离线假人.ToString();
			statusBarPanel2.Text = "地图物品:" + World.ItmeTeM.Count.ToString() + " 怪物:" + MapClass.GetNpcConn().ToString();
			double 接收速度 = World.接收速度;
			double 发送速度 = World.发送速度;
			double 广播发送速度 = World.广播发送速度;
			string text;
			if (接收速度 >= 1024.0)
			{
				接收速度 = World.接收速度 / 1024.0;
				text = Math.Round(接收速度, 0).ToString() + "K";
			}
			else
			{
				text = Math.Round(接收速度, 0).ToString() + "B";
			}
			string text2;
			if (发送速度 >= 1024.0)
			{
				发送速度 = World.发送速度 / 1024.0;
				text2 = Math.Round(发送速度, 0).ToString() + "K";
			}
			else
			{
				text2 = Math.Round(发送速度, 0).ToString() + "B";
			}
			if (广播发送速度 >= 1024.0)
			{
				广播发送速度 = World.广播发送速度 / 1024.0;
			}
			statusBarPanel3.Text = "收:" + text + "/s 发:" + text2 + "/s 包:" + Converter.Hexstring.Count.ToString();
			World.接收速度 = 0.0;
			World.发送速度 = 0.0;
			World.广播发送速度 = 0.0;
			TimeSpan timeSpan = DateTime.Now.Subtract(sj);
			statusBarPanel4.Text = timeSpan.Days.ToString() + "天" + timeSpan.Hours.ToString() + "时" + timeSpan.Minutes.ToString() + "分" + timeSpan.Seconds.ToString() + "秒";
		}

		private void menuItem29_Click(object sender, EventArgs e)
		{
			if (!runn)
			{
				runn = true;
				timerThread.Abort();
				thThreadRead.Abort();
				return;
			}
			thThreadRead = new Thread(FlushAll);
			thThreadRead.Name = "FlushAll";
			thThreadRead.Start();
			Timer.TimerThread @object = new Timer.TimerThread();
			timerThread = new Thread(@object.TimerMain);
			timerThread.Name = "Timer Thread";
			timerThread.Start();
		}

		private void menuItem5_Click(object sender, EventArgs e)
		{
			UserList userList = new UserList();
			userList.ShowDialog();
		}

		private void menuItem27_Click(object sender, EventArgs e)
		{
			int num = (int)new FormUser组队().ShowDialog();
		}

		private void menuItem7_Click(object sender, EventArgs e)
		{
			world.SetMonSter();
			Queue queue = Queue.Synchronized(new Queue());
			foreach (MapClass value in World.Map.Values)
			{
				foreach (NpcClass value2 in value.npcTemplate.Values)
				{
					queue.Enqueue(value2);
				}
			}
			while (queue.Count > 0)
			{
				((NpcClass)queue.Dequeue()).Dispose();
			}
			world.SetNpc();
			world.SetDrop();
			world.Set_GSDrop();
			world.SetBossDrop();
			world.SetOpen();
			world.SetLever();
			world.SetPatLever();
			world.SetKONGFU();
			world.SetItme();
			world.SetShot();
			world.SetMover();
			world.Set公告();
			world.Set移动();
			world.Set安全区();
			world.SetKill();
			world.Set冲关地图();
			world.SetBossInfo();
			world.Set百宝物品();
			world.set会员装备();
			world.Set套装物品();
			world.Set转职属性();
			world.Set冲级奖励物品();
			world.SetScript();
			world.Set科举出题题库();
			world.Set科举出题题库2();
			world.Set科举出题题库3();
			world.Set科举出题题库4();
			world.Set科举出题题库5();
			world.Set科举出题题库6();
			world.Set科举出题题库7();
			world.加载转生次数奖励();
			world.Set攻城战();
			world.加载攻城数据();
			world.SetDB首爆();
			world.SetDB首爆石头();
			world.SetDB自定义回收();
			world.加载假人商店物品列表();
			world.加载假人怪物坐标();
			world.加载假人喊话内容();
		}

		private void menuItem_50_Click(object sender, EventArgs e)
		{
			DialogResult dialogResult = MessageBox.Show("确认清理吗?", "清理全部数据", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
			if (dialogResult == DialogResult.OK)
			{
				string sqlCommand = "DELETE FROM TBL_ACCOUNT";
				string sqlCommand2 = "DELETE FROM TBL_人物数据";
				string sqlCommand3 = "DELETE FROM EventTop";
				string sqlCommand4 = "DELETE FROM TBL_宠物数据";
				string sqlCommand5 = "DELETE FROM TBL_帮派数据";
				string sqlCommand6 = "DELETE FROM TBL_帮派成员";
				string sqlCommand7 = "DELETE FROM TBL_综合仓库";
				string sqlCommand8 = "DELETE FROM TBL_个人仓库";
				string sqlCommand9 = "DELETE FROM 百宝记录";
				string sqlCommand10 = "DELETE FROM 登陆记录";
				string sqlCommand11 = "DELETE FROM 物品记录";
				string sqlCommand12 = "DELETE FROM 掉落记录";
				string sqlCommand13 = "DELETE FROM 帮战赌注";
				string sqlCommand14 = "DELETE FROM TBL_PK记录";
				string sqlCommand15 = "DELETE FROM TBL_传书系统";
				string sqlCommand16 = "DELETE FROM TBL_删除记录";
				string sqlCommand17 = "DELETE FROM TBL_师徒数据";
				string sqlCommand18 = "DELETE FROM luandouTop";
				string sqlCommand19 = "DELETE FROM 攻城城主";
				string sqlCommand20 = "DELETE FROM 首爆物品记录";
				string sqlCommand21 = "DELETE FROM 首爆石头记录";
				DBA.ExeSqlCommand(sqlCommand, "rxjhaccount");
				DBA.ExeSqlCommand(sqlCommand2, "GameServer");
				DBA.ExeSqlCommand(sqlCommand3, "GameServer");
				DBA.ExeSqlCommand(sqlCommand4, "GameServer");
				DBA.ExeSqlCommand(sqlCommand5, "GameServer");
				DBA.ExeSqlCommand(sqlCommand6, "GameServer");
				DBA.ExeSqlCommand(sqlCommand7, "GameServer");
				DBA.ExeSqlCommand(sqlCommand8, "GameServer");
				DBA.ExeSqlCommand(sqlCommand9, "GameServer");
				DBA.ExeSqlCommand(sqlCommand10, "GameServer");
				DBA.ExeSqlCommand(sqlCommand11, "GameServer");
				DBA.ExeSqlCommand(sqlCommand12, "GameServer");
				DBA.ExeSqlCommand(sqlCommand13, "GameServer");
				DBA.ExeSqlCommand(sqlCommand14, "GameServer");
				DBA.ExeSqlCommand(sqlCommand15, "GameServer");
				DBA.ExeSqlCommand(sqlCommand16, "GameServer");
				DBA.ExeSqlCommand(sqlCommand17, "GameServer");
				DBA.ExeSqlCommand(sqlCommand18, "GameServer");
				DBA.ExeSqlCommand(sqlCommand19, "GameServer");
				DBA.ExeSqlCommand(sqlCommand20, "GameServer");
				DBA.ExeSqlCommand(sqlCommand21, "GameServer");
				WriteLine(10, "所有账号数据人物数据都已经清理完成~");
			}
		}

		private void menuItem333_Click(object sender, EventArgs e)
		{
			DialogResult dialogResult = MessageBox.Show("确认清理吗?", "清理全部账号数据", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
			if (dialogResult == DialogResult.OK)
			{
				string sqlCommand = "DELETE FROM TBL_ACCOUNT";
				DBA.ExeSqlCommand(sqlCommand, "rxjhaccount");
				WriteLine(10, "所有账号数据都已经清理完成");
			}
		}

		private void menuItem222_Click(object sender, EventArgs e)
		{
			DialogResult dialogResult = MessageBox.Show("确认清理吗?", "清理全部人物数据", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
			if (dialogResult == DialogResult.OK)
			{
				string sqlCommand = "DELETE FROM TBL_人物数据";
				string sqlCommand2 = "DELETE FROM EventTop";
				string sqlCommand3 = "DELETE FROM TBL_宠物数据";
				string sqlCommand4 = "DELETE FROM TBL_帮派数据";
				string sqlCommand5 = "DELETE FROM TBL_帮派成员";
				string sqlCommand6 = "DELETE FROM TBL_综合仓库";
				string sqlCommand7 = "DELETE FROM TBL_个人仓库";
				string sqlCommand8 = "DELETE FROM 百宝记录";
				string sqlCommand9 = "DELETE FROM 登陆记录";
				string sqlCommand10 = "DELETE FROM 物品记录";
				string sqlCommand11 = "DELETE FROM 掉落记录";
				string sqlCommand12 = "DELETE FROM 帮战赌注";
				string sqlCommand13 = "DELETE FROM TBL_PK记录";
				string sqlCommand14 = "DELETE FROM TBL_传书系统";
				string sqlCommand15 = "DELETE FROM TBL_删除记录";
				string sqlCommand16 = "DELETE FROM TBL_师徒数据";
				string sqlCommand17 = "DELETE FROM luandouTop";
				string sqlCommand18 = "DELETE FROM 攻城城主";
				string sqlCommand19 = "DELETE FROM 首爆物品记录";
				string sqlCommand20 = "DELETE FROM 首爆石头记录";
				DBA.ExeSqlCommand(sqlCommand, "GameServer");
				DBA.ExeSqlCommand(sqlCommand2, "GameServer");
				DBA.ExeSqlCommand(sqlCommand3, "GameServer");
				DBA.ExeSqlCommand(sqlCommand4, "GameServer");
				DBA.ExeSqlCommand(sqlCommand5, "GameServer");
				DBA.ExeSqlCommand(sqlCommand6, "GameServer");
				DBA.ExeSqlCommand(sqlCommand7, "GameServer");
				DBA.ExeSqlCommand(sqlCommand8, "GameServer");
				DBA.ExeSqlCommand(sqlCommand9, "GameServer");
				DBA.ExeSqlCommand(sqlCommand10, "GameServer");
				DBA.ExeSqlCommand(sqlCommand11, "GameServer");
				DBA.ExeSqlCommand(sqlCommand12, "GameServer");
				DBA.ExeSqlCommand(sqlCommand13, "GameServer");
				DBA.ExeSqlCommand(sqlCommand14, "GameServer");
				DBA.ExeSqlCommand(sqlCommand15, "GameServer");
				DBA.ExeSqlCommand(sqlCommand16, "GameServer");
				DBA.ExeSqlCommand(sqlCommand17, "GameServer");
				DBA.ExeSqlCommand(sqlCommand18, "GameServer");
				DBA.ExeSqlCommand(sqlCommand19, "GameServer");
				DBA.ExeSqlCommand(sqlCommand20, "GameServer");
				WriteLine(10, "所有人物数据都已经清理完成");
			}
		}

		private void menuItem8_Click(object sender, EventArgs e)
		{
			world.SetMonSter();
		}

		private void menuItem9_Click(object sender, EventArgs e)
		{
			world.SetDrop();
		}

		private void menuItem10_Click(object sender, EventArgs e)
		{
			world.SetOpen();
		}

		private void menuItem11_Click(object sender, EventArgs e)
		{
			world.SetItme();
		}

		private void menuItem12_Click(object sender, EventArgs e)
		{
			world.SetShot();
		}

		private void menuItem_68_Click(object sender, EventArgs e)
		{
			world.Set科举出题题库();
			world.Set科举出题题库2();
			world.Set科举出题题库3();
			world.Set科举出题题库4();
			world.Set科举出题题库5();
			world.Set科举出题题库6();
			world.Set科举出题题库7();
		}

		private void menuItem13_Click(object sender, EventArgs e)
		{
			world.SetMover();
			world.Set移动();
			world.Set安全区();
		}

		private void menuItem14_Click(object sender, EventArgs e)
		{
			world.Set公告();
		}

		private void menuItem15_Click(object sender, EventArgs e)
		{
			if (menuItem15.Checked)
			{
				menuItem15.Checked = false;
				World.Log = 0;
				WriteLine(10, "记录封包关闭！");
			}
			else
			{
				menuItem15.Checked = true;
				World.Log = 1;
				WriteLine(10, "记录封包开启！");
			}
		}

		private void menuItem26_Click(object sender, EventArgs e)
		{
			if (menuItem26.Checked)
			{
				menuItem26.Checked = false;
				World.jlMsg = 0;
			}
			else
			{
				menuItem26.Checked = true;
				World.jlMsg = 1;
			}
		}

		private void menuItem16_Click(object sender, EventArgs e)
		{
			world.SetConfig();
			world.SetstConfig();
			world.SetqgConfig();
			world.SetgjConfig();
			world.ChongwuConfig();
			World.conn.发送("更新服务器配置|" + World.服务器ID.ToString() + "|" + World.最大在线.ToString());
			WriteLine(3, "重新加载配置文件完成");
		}

		public static void 读物刷新()
		{
			world.SetConfig();
		}

		private void menuItem17_Click(object sender, EventArgs e)
		{
			ParameterizedThreadStart start = 自动存档线程;
			Thread thread = new Thread(start);
			thread.Start();
		}

		private void menuItem18_Click(object sender, EventArgs e)
		{
			if (menuItem18.Checked)
			{
				menuItem18.Checked = false;
				World.验证服务器log = 0;
				WriteLine(10, "验证服务器关闭！");
			}
			else
			{
				menuItem18.Checked = true;
				World.验证服务器log = 1;
				WriteLine(10, "验证服务器开启！");
			}
		}

		private void menuItem19_Click(object sender, EventArgs e)
		{
			if (menuItem19.Checked)
			{
				menuItem19.Checked = false;
				World.记录日志 = 0;
				WriteLine(10, "记录日志关闭！");
			}
			else
			{
				menuItem19.Checked = true;
				World.记录日志 = 1;
				WriteLine(10, "记录日志开启！");
			}
		}

		private void menuItem20_Click(object sender, EventArgs e)
		{
			if (menuItem20.Checked)
			{
				menuItem20.Checked = false;
				World.AlWorldlog = false;
			}
			else
			{
				menuItem20.Checked = true;
				World.AlWorldlog = true;
			}
		}

		private void menuItem21_Click(object sender, EventArgs e)
		{
			try
			{
				if (menuItem21.Checked)
				{
					menuItem21.Checked = false;
					World.AllItmelog = 0;
				}
				else
				{
					menuItem21.Checked = true;
					World.AllItmelog = 1;
				}
			}
			catch (Exception ex)
			{
				WriteLine(1, "查物品错误    错误" + ex.Message);
			}
		}

		private void menuItem22_Click(object sender, EventArgs e)
		{
			Queue queue = Queue.Synchronized(new Queue());
			foreach (MapClass value in World.Map.Values)
			{
				foreach (NpcClass value2 in value.npcTemplate.Values)
				{
					queue.Enqueue(value2);
				}
			}
			while (queue.Count > 0)
			{
				((NpcClass)queue.Dequeue()).Dispose();
			}
			world.SetNpc();
		}

		private void menuItem23_Click(object sender, EventArgs e)
		{
			world.SetBossDrop();
		}

		private void menuItem25_Click(object sender, EventArgs e)
		{
			world.Set_GSDrop();
		}

		private void menuItem28_Click(object sender, EventArgs e)
		{
			world.SetKill();
		}

		private void menuItem30_Click(object sender, EventArgs e)
		{
			world.SetKONGFU();
		}

		public void Send单包(byte[] toSendBuff, int len)
		{
			int num = BitConverter.ToInt16(toSendBuff, 9);
			byte[] array = new byte[num + 7];
			Buffer.BlockCopy(toSendBuff, 5, array, 0, array.Length);
			Send封装发送(array, array.Length);
		}

		private void Send封装发送(byte[] toSendBuff, int length)
		{
			byte[] array = new byte[length + 15];
			array[0] = 170;
			array[1] = 85;
			Buffer.BlockCopy(BitConverter.GetBytes(length + 9), 0, array, 2, 2);
			Buffer.BlockCopy(toSendBuff, 0, array, 5, length);
			array[array.Length - 2] = 85;
			array[array.Length - 1] = 170;
			string value = Converter.ToString(array);
			Console.WriteLine(value);
		}

		public void 复查用户登陆()
		{
			try
			{
				StringBuilder stringBuilder = new StringBuilder();
				foreach (NetState value in World.list.Values)
				{
					stringBuilder.Append(value.Player.Userid);
					stringBuilder.Append("-");
					stringBuilder.Append(value.Player.Client.绑定帐号);
					stringBuilder.Append("-");
					stringBuilder.Append(value.Player.UserName);
					if (value.Player.是否人物离线挂机)
					{
						stringBuilder.Append("-1");
					}
					stringBuilder.Append(",");
				}
				if (stringBuilder.Length > 0)
				{
					stringBuilder.Remove(stringBuilder.Length - 1, 1);
				}
				World.conn.发送("复查用户登陆|" + stringBuilder?.ToString());
			}
			catch (Exception ex)
			{
				WriteLine(1, "复查用户登陆 错误" + ex.Message);
			}
		}

		private void GraphPanel_Paint(object sender, PaintEventArgs e)
		{
			try
			{
				Graphics graphics = e.Graphics;
				graphics.SmoothingMode = SmoothingMode.AntiAlias;
				graphics.PixelOffsetMode = PixelOffsetMode.None;
				string s = "连接:" + World.list.Count.ToString() + "/" + World.最大在线.ToString() + "  在线:" + World.allConnectedChars.Count.ToString() + "  主Socket:" + World.主Socket.ToString() + "  SocketState:" + World.SocketState + "  组队:" + World.W组队.Count.ToString() + "  离线队列:" + World.m_Disposed.Count.ToString() + "  数据库队列:" + World.SqlPool.Count.ToString() + "  狮子列队:" + World.狮子吼List.Count.ToString();
				graphics.DrawString(s, Control.DefaultFont, Brushes.Yellow, new Point(20, 5));
				Text = "服务器名:[" + World.服务器名 + "]  游戏服务器端口:[" + World.游戏服务器端口1.ToString() + "]  服务器ID:[" + World.服务器ID.ToString() + "]  服务器组ID:[" + World.服务器组ID.ToString() + "]" + Assembly.GetExecutingAssembly().GetName().Version.ToString();
				int num = 0;
				foreach (TxtClass item in txt)
				{
					switch (item.type)
					{
					case 0:
						graphics.DrawString(item.Txt, Control.DefaultFont, Brushes.Black, new Point(5, num += 17));
						break;
					case 1:
						graphics.DrawString(item.Txt, Control.DefaultFont, Brushes.Red, new Point(5, num += 17));
						break;
					case 2:
						graphics.DrawString(item.Txt, Control.DefaultFont, Brushes.Black, new Point(5, num += 17));
						break;
					case 3:
						graphics.DrawString(item.Txt, Control.DefaultFont, Brushes.Lime, new Point(5, num += 17));
						break;
					case 4:
						graphics.DrawString(item.Txt, Control.DefaultFont, Brushes.Teal, new Point(5, num += 17));
						break;
					case 5:
						graphics.DrawString(item.Txt, Control.DefaultFont, Brushes.DodgerBlue, new Point(5, num += 17));
						break;
					case 6:
						graphics.DrawString(item.Txt, Control.DefaultFont, Brushes.Blue, new Point(5, num += 17));
						break;
					default:
						graphics.DrawString(item.Txt, Control.DefaultFont, Brushes.Black, new Point(5, num += 17));
						break;
					}
				}
			}
			catch
			{
			}
		}

		public static void WriteLine(int type, string txtt)
		{
			int num = kjdx / 18;
			lock (txt)
			{
				if (type == 98)
				{
					logo.qjfuzhi(txtt);
				}
				if (type == 100)
				{
					logo.错误日志(txtt);
					txt.Add(new TxtClass(type, DateTime.Now.ToString() + " " + txtt));
					int count = txt.Count;
					if (num <= 0)
					{
						num = 20;
					}
					if (count > num)
					{
						for (int i = 0; i < count - num; i++)
						{
							txt.RemoveAt(0);
						}
					}
				}
				else if (World.AlWorldlog)
				{
					if (World.记录日志 == 1)
					{
						switch (type)
						{
						case 1:
							logo.错误日志(txtt);
							break;
						case 2:
							logo.FileCQTxtLog(txtt);
							break;
						case 3:
							logo.FileLoninTxtLog(txtt);
							break;
						case 4:
							logo.FileDropItmeTxtLog(txtt);
							break;
						case 5:
							logo.FileItmeTxtLog(txtt);
							break;
						case 6:
							logo.FileBugTxtLog(txtt);
							break;
						case 7:
							logo.FilePakTxtLog(txtt);
							break;
						case 8:
							logo.SeveTxtLog(txtt);
							break;
						case 9:
							logo.非法外挂日志(txtt);
							break;
						case 10:
							logo.界面显示记录(txtt);
							break;
						case 11:
							logo.武勋丹记录(txtt);
							break;
						case 72:
							logo.元宝消费提示(txtt);
							break;
						case 73:
							logo.积分消费提示(txtt);
							break;
						}
					}
					switch (type)
					{
					case 99:
						logo.错误日志(txtt);
						break;
					case 88:
						logo.pzTxtLog(txtt);
						break;
					case 77:
						logo.cfzTxtLog(txtt);
						break;
					case 44:
						logo.Logout(txtt);
						break;
					case 55:
						if (World.记录再造)
						{
							logo.FileReMakeTxtLog(txtt);
						}
						break;
					}
					txt.Add(new TxtClass(type, DateTime.Now.ToString() + " " + txtt));
					int count2 = txt.Count;
					if (num <= 0)
					{
						num = 20;
					}
					if (count2 > num)
					{
						for (int j = 0; j < count2 - num; j++)
						{
							txt.RemoveAt(0);
						}
					}
				}
			}
		}

		private void menuItem31_Click(object sender, EventArgs e)
		{
			if (T != null)
			{
				NetSet netSet = new NetSet(T.Server);
				netSet.Show();
			}
		}

		private void Form1_Layout(object sender, LayoutEventArgs e)
		{
			if (GraphPanel.Height != 0)
			{
				kjdx = GraphPanel.Height;
			}
		}

		private void menuItem37_Click(object sender, EventArgs e)
		{
			Form2 form = new Form2();
			form.ShowDialog();
		}

		private void menuItem38_Click(object sender, EventArgs e)
		{
			if (menuItem38.Checked)
			{
				menuItem38.Checked = false;
				World.Droplog = false;
				WriteLine(10, "显示掉落关闭！");
			}
			else
			{
				menuItem38.Checked = true;
				World.Droplog = true;
				WriteLine(10, "显示掉落开启！");
			}
		}

		private void menuItem39_Click(object sender, EventArgs e)
		{
			world.SetScript();
		}

		private void menuItem44_Click(object sender, EventArgs e)
		{
			world.Set百宝物品();
		}

		private void menuItem47_Click(object sender, EventArgs e)
		{
			world.set会员装备();
			world.Set套装物品();
		}

		private void menuItem50_Click(object sender, EventArgs e)
		{
			world.set会员装备();
			world.Set转职属性();
			world.Set冲级奖励物品();
		}

		private void menuItem51_Click(object sender, EventArgs e)
		{
			world.Set任务物品();
			world.Set任务传书数据();
		}

		private void menuItem49_Click_1(object sender, EventArgs e)
		{
			if (T != null)
			{
				T.Stop();
				T = null;
			}
			Random random = new Random();
			World.游戏服务器端口1 = World.游戏服务器端口 + random.Next(10, 200);
			T = new RxjhServer.Network.Listener((ushort)World.游戏服务器端口1);
			World.端口更换通知();
		}

		private void menuItem_56_Click(object sender, EventArgs e)
		{
			world.Set攻城战();
		}

		private void menuItem_402_Click(object sender, EventArgs e)
		{
			world.加载转生次数奖励();
		}

		private void menuItem35_Click_1(object sender, EventArgs e)
		{
			if (menuItem35.Checked)
			{
				menuItem34.Checked = false;
				World.记录再造 = false;
			}
			else
			{
				menuItem35.Checked = true;
				World.记录再造 = true;
			}
		}

		private void menuItem34_Click_1(object sender, EventArgs e)
		{
			if (menuItem34.Checked)
			{
				menuItem34.Checked = false;
				World.记录掉落 = false;
			}
			else
			{
				menuItem34.Checked = true;
				World.记录掉落 = true;
			}
		}

		private void menuItem42_Click_1(object sender, EventArgs e)
		{
			world.SetBossInfo();
		}

		private void menuItem45_Click_1(object sender, EventArgs e)
		{
			Move move = new Move();
			move.StartPosition = FormStartPosition.CenterParent;
			move.ShowDialog();
		}

		private void menuItem52_Click_1(object sender, EventArgs e)
		{
			CheckCopy checkCopy = new CheckCopy();
			checkCopy.StartPosition = FormStartPosition.CenterParent;
			checkCopy.ShowDialog();
		}

		private void menuItem53_Click_1(object sender, EventArgs e)
		{
			world.Set石头属性();
		}

		private void menuItem55_Click(object sender, EventArgs e)
		{
			石头属性调整 石头属性调整 = new 石头属性调整();
			石头属性调整.StartPosition = FormStartPosition.CenterParent;
			石头属性调整.ShowDialog();
		}

		private void menuItem57_Click(object sender, EventArgs e)
		{
			world.Set乱斗地区();
			world.加载乱斗排名奖励();
			world.加载段位提示数据();
		}

		private void InitializeComponent()
		{
			components = new System.ComponentModel.Container();
			System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RxjhServer.Form1));
			statusBar1 = new System.Windows.Forms.StatusBar();
			statusBarPanel1 = new System.Windows.Forms.StatusBarPanel();
			statusBarPanel2 = new System.Windows.Forms.StatusBarPanel();
			statusBarPanel3 = new System.Windows.Forms.StatusBarPanel();
			statusBarPanel4 = new System.Windows.Forms.StatusBarPanel();
			imageList1 = new System.Windows.Forms.ImageList(components);
			mainMenu1 = new System.Windows.Forms.MainMenu(components);
			menuItem1 = new System.Windows.Forms.MenuItem();
			menuItem32 = new System.Windows.Forms.MenuItem();
			menuItem3 = new System.Windows.Forms.MenuItem();
			menuItem2 = new System.Windows.Forms.MenuItem();
			menuItem29 = new System.Windows.Forms.MenuItem();
			menuItem17 = new System.Windows.Forms.MenuItem();
			menuItem31 = new System.Windows.Forms.MenuItem();
			menuItem49 = new System.Windows.Forms.MenuItem();
			menuItem63 = new System.Windows.Forms.MenuItem();
			menuItem43 = new System.Windows.Forms.MenuItem();
			menuItem4 = new System.Windows.Forms.MenuItem();
			menuItem5 = new System.Windows.Forms.MenuItem();
			menuItem27 = new System.Windows.Forms.MenuItem();
			menuItem21 = new System.Windows.Forms.MenuItem();
			menuItem26 = new System.Windows.Forms.MenuItem();
			menuItem37 = new System.Windows.Forms.MenuItem();
			menuItem35 = new System.Windows.Forms.MenuItem();
			menuItem34 = new System.Windows.Forms.MenuItem();
			menuItem20 = new System.Windows.Forms.MenuItem();
			menuItem38 = new System.Windows.Forms.MenuItem();
			menuItem19 = new System.Windows.Forms.MenuItem();
			menuItem15 = new System.Windows.Forms.MenuItem();
			menuItem18 = new System.Windows.Forms.MenuItem();
			menuItem69 = new System.Windows.Forms.MenuItem();
			menuItem71 = new System.Windows.Forms.MenuItem();
			menuItem_49 = new System.Windows.Forms.MenuItem();
			menuItem_50 = new System.Windows.Forms.MenuItem();
			menuItem222 = new System.Windows.Forms.MenuItem();
			menuItem333 = new System.Windows.Forms.MenuItem();
			menuItem6 = new System.Windows.Forms.MenuItem();
			menuItem16 = new System.Windows.Forms.MenuItem();
			menuItem39 = new System.Windows.Forms.MenuItem();
			menuItem28 = new System.Windows.Forms.MenuItem();
			menuItem30 = new System.Windows.Forms.MenuItem();
			menuItem8 = new System.Windows.Forms.MenuItem();
			menuItem10 = new System.Windows.Forms.MenuItem();
			menuItem11 = new System.Windows.Forms.MenuItem();
			menuItem12 = new System.Windows.Forms.MenuItem();
			menuItem14 = new System.Windows.Forms.MenuItem();
			menuItem57 = new System.Windows.Forms.MenuItem();
			menuItem_68 = new System.Windows.Forms.MenuItem();
			menuItem42 = new System.Windows.Forms.MenuItem();
			menuItem23 = new System.Windows.Forms.MenuItem();
			menuItem44 = new System.Windows.Forms.MenuItem();
			menuItem_56 = new System.Windows.Forms.MenuItem();
			menuItem9 = new System.Windows.Forms.MenuItem();
			menuItem25 = new System.Windows.Forms.MenuItem();
			menuItem_402 = new System.Windows.Forms.MenuItem();
			menuItem53 = new System.Windows.Forms.MenuItem();
			menuItem59 = new System.Windows.Forms.MenuItem();
			menuItem51 = new System.Windows.Forms.MenuItem();
			menuItem47 = new System.Windows.Forms.MenuItem();
			menuItem60 = new System.Windows.Forms.MenuItem();
			menuItem22 = new System.Windows.Forms.MenuItem();
			menuItem7 = new System.Windows.Forms.MenuItem();
			menuItem13 = new System.Windows.Forms.MenuItem();
			menuItem50 = new System.Windows.Forms.MenuItem();
			menuItem80 = new System.Windows.Forms.MenuItem();
			menuItem81 = new System.Windows.Forms.MenuItem();
			menuItem40 = new System.Windows.Forms.MenuItem();
			menuItem54 = new System.Windows.Forms.MenuItem();
			menuItem72 = new System.Windows.Forms.MenuItem();
			menuItem66 = new System.Windows.Forms.MenuItem();
			menuItem65 = new System.Windows.Forms.MenuItem();
			menuItem45 = new System.Windows.Forms.MenuItem();
			menuItem67 = new System.Windows.Forms.MenuItem();
			menuItem68 = new System.Windows.Forms.MenuItem();
			menuItem73 = new System.Windows.Forms.MenuItem();
			menuItem74 = new System.Windows.Forms.MenuItem();
			menuItem58 = new System.Windows.Forms.MenuItem();
			menuItem70 = new System.Windows.Forms.MenuItem();
			menuItem52 = new System.Windows.Forms.MenuItem();
			menuItem55 = new System.Windows.Forms.MenuItem();
			menuItem41 = new System.Windows.Forms.MenuItem();
			menuItem78 = new System.Windows.Forms.MenuItem();
			menuItem33 = new System.Windows.Forms.MenuItem();
			menuItem79 = new System.Windows.Forms.MenuItem();
			menuItem48 = new System.Windows.Forms.MenuItem();
			menuItem76 = new System.Windows.Forms.MenuItem();
			menuItem24 = new System.Windows.Forms.MenuItem();
			menuItem75 = new System.Windows.Forms.MenuItem();
			menuItem56 = new System.Windows.Forms.MenuItem();
			menuItem77 = new System.Windows.Forms.MenuItem();
			menuItem82 = new System.Windows.Forms.MenuItem();
			menuItem46 = new System.Windows.Forms.MenuItem();
			menuItem36 = new System.Windows.Forms.MenuItem();
			menuItem64 = new System.Windows.Forms.MenuItem();
			menuItem61 = new System.Windows.Forms.MenuItem();
			timer1 = new System.Windows.Forms.Timer(components);
			toolStrip1 = new System.Windows.Forms.ToolStrip();
			toolStripTextBox1 = new System.Windows.Forms.ToolStripTextBox();
			toolStripComboBox2 = new System.Windows.Forms.ToolStripComboBox();
			toolStripButton1 = new System.Windows.Forms.ToolStripButton();
			toolStripTextBox2 = new System.Windows.Forms.ToolStripTextBox();
			toolStripComboBox1 = new System.Windows.Forms.ToolStripComboBox();
			toolStripButton2 = new System.Windows.Forms.ToolStripButton();
			toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
			toolStripButton3 = new System.Windows.Forms.ToolStripButton();
			toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
			toolStripButton4 = new System.Windows.Forms.ToolStripButton();
			GraphPanel = new RxjhServer.FlickerFreePanel();
			((System.ComponentModel.ISupportInitialize)statusBarPanel1).BeginInit();
			((System.ComponentModel.ISupportInitialize)statusBarPanel2).BeginInit();
			((System.ComponentModel.ISupportInitialize)statusBarPanel3).BeginInit();
			((System.ComponentModel.ISupportInitialize)statusBarPanel4).BeginInit();
			toolStrip1.SuspendLayout();
			SuspendLayout();
			statusBar1.Location = new System.Drawing.Point(0, 292);
			statusBar1.Name = "statusBar1";
			statusBar1.Panels.AddRange(new System.Windows.Forms.StatusBarPanel[4]
			{
				statusBarPanel1,
				statusBarPanel2,
				statusBarPanel3,
				statusBarPanel4
			});
			statusBar1.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
			statusBar1.ShowPanels = true;
			statusBar1.Size = new System.Drawing.Size(697, 24);
			statusBar1.TabIndex = 6;
			statusBar1.Text = "statusBar1";
			statusBar1.PanelClick += new System.Windows.Forms.StatusBarPanelClickEventHandler(statusBar1_PanelClick);
			statusBarPanel1.Alignment = System.Windows.Forms.HorizontalAlignment.Right;
			statusBarPanel1.Name = "statusBarPanel1";
			statusBarPanel1.Text = "连接 1000 在线 1000  假人 1000 在线 1000";
			statusBarPanel1.Width = 260;
			statusBarPanel2.Alignment = System.Windows.Forms.HorizontalAlignment.Right;
			statusBarPanel2.Name = "statusBarPanel2";
			statusBarPanel2.Width = 150;
			statusBarPanel3.Alignment = System.Windows.Forms.HorizontalAlignment.Right;
			statusBarPanel3.Name = "statusBarPanel3";
			statusBarPanel3.Width = 160;
			statusBarPanel4.Name = "statusBarPanel4";
			statusBarPanel4.Text = "statusBarPanel4";
			statusBarPanel4.Width = 110;
			imageList1.ImageStream = (System.Windows.Forms.ImageListStreamer)resources.GetObject("imageList1.ImageStream");
			imageList1.TransparentColor = System.Drawing.Color.Transparent;
			imageList1.Images.SetKeyName(0, "");
			imageList1.Images.SetKeyName(1, "");
			imageList1.Images.SetKeyName(2, "");
			imageList1.Images.SetKeyName(3, "");
			imageList1.Images.SetKeyName(4, "");
			mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[7]
			{
				menuItem1,
				menuItem4,
				menuItem6,
				menuItem40,
				menuItem41,
				menuItem64,
				menuItem61
			});
			menuItem1.Index = 0;
			menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[9]
			{
				menuItem32,
				menuItem3,
				menuItem2,
				menuItem29,
				menuItem17,
				menuItem31,
				menuItem49,
				menuItem63,
				menuItem43
			});
			menuItem1.Text = "程序服务";
			menuItem32.Index = 0;
			menuItem32.Text = "开始登陆服务";
			menuItem32.Click += new System.EventHandler(menuItem32_Click);
			menuItem3.Index = 1;
			menuItem3.Text = "停止登陆服务";
			menuItem3.Click += new System.EventHandler(menuItem3_Click);
			menuItem2.Index = 2;
			menuItem2.Text = "停止主服务";
			menuItem2.Click += new System.EventHandler(menuItem2_Click);
			menuItem29.Index = 3;
			menuItem29.Text = "线程停止";
			menuItem29.Click += new System.EventHandler(menuItem29_Click);
			menuItem17.Index = 4;
			menuItem17.Text = "存档";
			menuItem17.Click += new System.EventHandler(menuItem17_Click);
			menuItem31.Index = 5;
			menuItem31.Text = "插件设置";
			menuItem31.Click += new System.EventHandler(menuItem31_Click);
			menuItem49.Index = 6;
			menuItem49.Text = "手动转换登录端口";
			menuItem49.Click += new System.EventHandler(menuItem49_Click_1);
			menuItem63.Index = 7;
			menuItem63.Text = "防CC攻击设置";
			menuItem63.Click += new System.EventHandler(menuItem63_Click_1);
			menuItem43.Index = 8;
			menuItem43.Text = "关于程序";
			menuItem43.Click += new System.EventHandler(menuItem43_Click_2);
			menuItem4.Index = 1;
			menuItem4.MenuItems.AddRange(new System.Windows.Forms.MenuItem[15]
			{
				menuItem5,
				menuItem27,
				menuItem21,
				menuItem26,
				menuItem37,
				menuItem35,
				menuItem34,
				menuItem20,
				menuItem38,
				menuItem19,
				menuItem15,
				menuItem18,
				menuItem69,
				menuItem71,
				menuItem_49
			});
			menuItem4.Text = "程序控制";
			menuItem5.Index = 0;
			menuItem5.Text = "用户";
			menuItem5.Click += new System.EventHandler(menuItem5_Click);
			menuItem27.Index = 1;
			menuItem27.Text = "组队";
			menuItem27.Click += new System.EventHandler(menuItem27_Click);
			menuItem21.Checked = true;
			menuItem21.Index = 2;
			menuItem21.Text = "查复制";
			menuItem21.Click += new System.EventHandler(menuItem21_Click);
			menuItem26.Index = 3;
			menuItem26.Text = "查SQL";
			menuItem26.Click += new System.EventHandler(menuItem26_Click);
			menuItem37.Index = 4;
			menuItem37.Text = "地面物品";
			menuItem37.Click += new System.EventHandler(menuItem37_Click);
			menuItem35.Index = 5;
			menuItem35.Text = "记录再造";
			menuItem35.Click += new System.EventHandler(menuItem35_Click_1);
			menuItem34.Checked = true;
			menuItem34.Index = 6;
			menuItem34.Text = "记录掉落";
			menuItem34.Click += new System.EventHandler(menuItem34_Click_1);
			menuItem20.Checked = true;
			menuItem20.Index = 7;
			menuItem20.Text = "显示记录";
			menuItem20.Click += new System.EventHandler(menuItem20_Click);
			menuItem38.Index = 8;
			menuItem38.Text = "显示掉落";
			menuItem38.Click += new System.EventHandler(menuItem38_Click);
			menuItem19.Index = 9;
			menuItem19.Text = "记录日志";
			menuItem19.Click += new System.EventHandler(menuItem19_Click);
			menuItem15.Index = 10;
			menuItem15.Text = "记录封包";
			menuItem15.Click += new System.EventHandler(menuItem15_Click);
			menuItem18.Index = 11;
			menuItem18.Text = "验证服务器";
			menuItem18.Click += new System.EventHandler(menuItem18_Click);
			menuItem69.Index = 12;
			menuItem69.Text = "显示说话开启";
			menuItem69.Click += new System.EventHandler(menuItem69_Click);
			menuItem71.Index = 13;
			menuItem71.Text = "快速攻击监测";
			menuItem71.Click += new System.EventHandler(menuItem71_Click);
			menuItem_49.Index = 14;
			menuItem_49.MenuItems.AddRange(new System.Windows.Forms.MenuItem[3]
			{
				menuItem_50,
				menuItem222,
				menuItem333
			});
			menuItem_49.Text = "数据清理工具";
			menuItem_50.Index = 0;
			menuItem_50.Text = "清除全部";
			menuItem_50.Click += new System.EventHandler(menuItem_50_Click);
			menuItem222.Index = 1;
			menuItem222.Text = "只清账号";
			menuItem222.Click += new System.EventHandler(menuItem333_Click);
			menuItem333.Index = 2;
			menuItem333.Text = "只清人物";
			menuItem333.Click += new System.EventHandler(menuItem222_Click);
			menuItem6.Index = 2;
			menuItem6.MenuItems.AddRange(new System.Windows.Forms.MenuItem[29]
			{
				menuItem16,
				menuItem39,
				menuItem28,
				menuItem30,
				menuItem8,
				menuItem10,
				menuItem11,
				menuItem12,
				menuItem14,
				menuItem57,
				menuItem_68,
				menuItem42,
				menuItem23,
				menuItem44,
				menuItem_56,
				menuItem9,
				menuItem25,
				menuItem_402,
				menuItem53,
				menuItem59,
				menuItem51,
				menuItem47,
				menuItem60,
				menuItem22,
				menuItem7,
				menuItem13,
				menuItem50,
				menuItem80,
				menuItem81
			});
			menuItem6.Text = "数据刷新";
			menuItem16.Index = 0;
			menuItem16.Text = "重读配置文件";
			menuItem16.Click += new System.EventHandler(menuItem16_Click);
			menuItem39.Index = 1;
			menuItem39.Text = "重读脚本";
			menuItem39.Click += new System.EventHandler(menuItem39_Click);
			menuItem28.Index = 2;
			menuItem28.Text = "重读过滤";
			menuItem28.Click += new System.EventHandler(menuItem28_Click);
			menuItem30.Index = 3;
			menuItem30.Text = "重读功夫数据";
			menuItem30.Click += new System.EventHandler(menuItem30_Click);
			menuItem8.Index = 4;
			menuItem8.Text = "重读NPC列表";
			menuItem8.Click += new System.EventHandler(menuItem8_Click);
			menuItem10.Index = 5;
			menuItem10.Text = "重读开箱数据";
			menuItem10.Click += new System.EventHandler(menuItem10_Click);
			menuItem11.Index = 6;
			menuItem11.Text = "重读物品列表";
			menuItem11.Click += new System.EventHandler(menuItem11_Click);
			menuItem12.Index = 7;
			menuItem12.Text = "重读商店物品";
			menuItem12.Click += new System.EventHandler(menuItem12_Click);
			menuItem14.Index = 8;
			menuItem14.Text = "重读自动公告";
			menuItem14.Click += new System.EventHandler(menuItem14_Click);
			menuItem57.Index = 9;
			menuItem57.Text = "重读PK赛设置";
			menuItem57.Click += new System.EventHandler(menuItem57_Click);
			menuItem_68.Index = 10;
			menuItem_68.Text = "重读题库数据";
			menuItem_68.Click += new System.EventHandler(menuItem_68_Click);
			menuItem42.Index = 11;
			menuItem42.Text = "重读BOSS设置";
			menuItem42.Click += new System.EventHandler(menuItem42_Click_1);
			menuItem23.Index = 12;
			menuItem23.Text = "重读掉落_BOSS";
			menuItem23.Click += new System.EventHandler(menuItem23_Click);
			menuItem44.Index = 13;
			menuItem44.Text = "重读百宝阁物品";
			menuItem44.Click += new System.EventHandler(menuItem44_Click);
			menuItem_56.Index = 14;
			menuItem_56.Text = "重读攻城战区域";
			menuItem_56.Click += new System.EventHandler(menuItem_56_Click);
			menuItem9.Index = 15;
			menuItem9.Text = "重读掉落_普通怪";
			menuItem9.Click += new System.EventHandler(menuItem9_Click);
			menuItem25.Index = 16;
			menuItem25.Text = "重读掉落_高手怪";
			menuItem25.Click += new System.EventHandler(menuItem25_Click);
			menuItem_402.Index = 17;
			menuItem_402.Text = "重读转生次数奖励";
			menuItem_402.Click += new System.EventHandler(menuItem_402_Click);
			menuItem53.Index = 18;
			menuItem53.Text = "重读石头属性效果";
			menuItem53.Click += new System.EventHandler(menuItem53_Click_1);
			menuItem59.Index = 19;
			menuItem59.Text = "重读首爆奖励数据";
			menuItem59.Click += new System.EventHandler(menuItem59_Click);
			menuItem51.Index = 20;
			menuItem51.Text = "任务物品/任务系统";
			menuItem51.Click += new System.EventHandler(menuItem51_Click);
			menuItem47.Index = 21;
			menuItem47.Text = "会员装备/套装物品";
			menuItem47.Click += new System.EventHandler(menuItem47_Click);
			menuItem60.Index = 22;
			menuItem60.Text = "重读自定义回收数据";
			menuItem60.Click += new System.EventHandler(menuItem60_Click);
			menuItem22.Index = 23;
			menuItem22.Text = "重读怪物数据（慎用）";
			menuItem22.Click += new System.EventHandler(menuItem22_Click);
			menuItem7.Index = 24;
			menuItem7.Text = "重读全部配置（慎用）";
			menuItem7.Click += new System.EventHandler(menuItem7_Click);
			menuItem13.Index = 25;
			menuItem13.Text = "移动数据/地图列表/安全区";
			menuItem13.Click += new System.EventHandler(menuItem13_Click);
			menuItem50.Index = 26;
			menuItem50.Text = "会员装备/转职属性冲级奖品";
			menuItem50.Click += new System.EventHandler(menuItem50_Click);
			menuItem80.Index = 27;
			menuItem80.Text = "重读假人商店物品列表";
			menuItem80.Click += new System.EventHandler(menuItem80_Click);
			menuItem81.Index = 28;
			menuItem81.Text = "重读假人喊话内容";
			menuItem81.Click += new System.EventHandler(menuItem81_Click);
			menuItem40.Index = 3;
			menuItem40.MenuItems.AddRange(new System.Windows.Forms.MenuItem[13]
			{
				menuItem54,
				menuItem72,
				menuItem66,
				menuItem65,
				menuItem45,
				menuItem67,
				menuItem68,
				menuItem73,
				menuItem74,
				menuItem58,
				menuItem70,
				menuItem52,
				menuItem55
			});
			menuItem40.Text = "常用工具";
			menuItem54.Index = 0;
			menuItem54.Text = "GM工具";
			menuItem54.Click += new System.EventHandler(menuItem54_Click_1);
			menuItem72.Index = 1;
			menuItem72.Text = "合区工具";
			menuItem72.Click += new System.EventHandler(menuItem72_Click);
			menuItem66.Index = 2;
			menuItem66.Text = "全体跨线";
			menuItem66.Click += new System.EventHandler(menuItem66_Click);
			menuItem65.Index = 3;
			menuItem65.Text = "装备发送";
			menuItem65.Click += new System.EventHandler(menuItem65_Click);
			menuItem45.Index = 4;
			menuItem45.Text = "移动控制";
			menuItem45.Click += new System.EventHandler(menuItem45_Click_1);
			menuItem67.Index = 5;
			menuItem67.Text = "假人系统";
			menuItem67.Click += new System.EventHandler(menuItem67_Click);
			menuItem68.Index = 6;
			menuItem68.Text = "爆率修改";
			menuItem68.Click += new System.EventHandler(menuItem68_Click);
			menuItem73.Index = 7;
			menuItem73.Text = "自动解封";
			menuItem73.Click += new System.EventHandler(menuItem73_Click);
			menuItem74.Index = 8;
			menuItem74.Text = "发送公告";
			menuItem74.Click += new System.EventHandler(menuItem74_Click);
			menuItem58.Index = 9;
			menuItem58.Text = "掉落/开箱";
			menuItem58.Click += new System.EventHandler(menuItem58_Click);
			menuItem70.Index = 10;
			menuItem70.Text = "YBI编辑器";
			menuItem70.Click += new System.EventHandler(menuItem70_Click);
			menuItem52.Index = 11;
			menuItem52.Text = "查物品复制";
			menuItem52.Click += new System.EventHandler(menuItem52_Click_1);
			menuItem55.Index = 12;
			menuItem55.Text = "石头属性调整";
			menuItem55.Click += new System.EventHandler(menuItem55_Click);
			menuItem41.Index = 4;
			menuItem41.MenuItems.AddRange(new System.Windows.Forms.MenuItem[12]
			{
				menuItem78,
				menuItem33,
				menuItem79,
				menuItem48,
				menuItem76,
				menuItem24,
				menuItem75,
				menuItem56,
				menuItem77,
				menuItem82,
				menuItem46,
				menuItem36
			});
			menuItem41.Text = "活动选择";
			menuItem78.Index = 0;
			menuItem78.Text = "开启科举";
			menuItem78.Click += new System.EventHandler(menuItem78_Click);
			menuItem33.Index = 1;
			menuItem33.Text = "开启PK赛";
			menuItem33.Click += new System.EventHandler(menuItem33_Click);
			menuItem79.Index = 2;
			menuItem79.Text = "幸运奖开启";
			menuItem79.Click += new System.EventHandler(menuItem79_Click);
			menuItem48.Index = 3;
			menuItem48.Text = "开启新门战";
			menuItem48.Click += new System.EventHandler(menuItem48_Click);
			menuItem76.Index = 4;
			menuItem76.Text = "攻城战开关";
			menuItem76.Click += new System.EventHandler(menuItem76_Click);
			menuItem24.Index = 5;
			menuItem24.Text = "开启高倍经验";
			menuItem24.Click += new System.EventHandler(menuItem24_Click_1);
			menuItem75.Index = 6;
			menuItem75.Text = "开启异口同声";
			menuItem75.Click += new System.EventHandler(menuItem75_Click);
			menuItem56.Index = 7;
			menuItem56.Text = "活动副本开关";
			menuItem56.Click += new System.EventHandler(menuItem56_Click);
			menuItem77.Index = 8;
			menuItem77.Text = "开启势力战三转";
			menuItem77.Click += new System.EventHandler(menuItem77_Click);
			menuItem82.Index = 9;
			menuItem82.Text = "开关  【势力战";
			menuItem82.Click += new System.EventHandler(menuItem82_Click_1);
			menuItem46.Index = 10;
			menuItem46.Text = "开启势力战四转";
			menuItem46.Click += new System.EventHandler(menuItem46_Click);
			menuItem36.Index = 11;
			menuItem36.Text = "开启世界BOSS";
			menuItem36.Click += new System.EventHandler(menuItem36_Click);
			menuItem64.Index = 5;
			menuItem64.Text = "万鑫江湖";
			menuItem64.Click += new System.EventHandler(menuItem64_Click);
			menuItem61.Index = 6;
			menuItem61.Text = "假人设置";
			menuItem61.Click += new System.EventHandler(menuItem61_Click);
			timer1.Enabled = true;
			timer1.Interval = 1000;
			timer1.Tick += new System.EventHandler(timer1_Tick);
			toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[10]
			{
				toolStripTextBox1,
				toolStripComboBox2,
				toolStripButton1,
				toolStripTextBox2,
				toolStripComboBox1,
				toolStripButton2,
				toolStripSeparator1,
				toolStripButton3,
				toolStripSeparator2,
				toolStripButton4
			});
			toolStrip1.Location = new System.Drawing.Point(0, 0);
			toolStrip1.Name = "toolStrip1";
			toolStrip1.Size = new System.Drawing.Size(697, 25);
			toolStrip1.TabIndex = 16;
			toolStrip1.Text = "toolStrip1";
			toolStripTextBox1.Font = new System.Drawing.Font("Microsoft YaHei UI", 9f);
			toolStripTextBox1.Name = "toolStripTextBox1";
			toolStripTextBox1.Size = new System.Drawing.Size(200, 25);
			toolStripTextBox1.Text = "AA551000000000D500010002000000000000000055AA";
			toolStripComboBox2.DropDownWidth = 75;
			toolStripComboBox2.IntegralHeight = false;
			toolStripComboBox2.Items.AddRange(new object[2]
			{
				"正常",
				"加密"
			});
			toolStripComboBox2.Name = "toolStripComboBox2";
			toolStripComboBox2.Size = new System.Drawing.Size(75, 25);
			toolStripComboBox2.Text = "正常";
			toolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
			toolStripButton1.ForeColor = System.Drawing.Color.Black;
			toolStripButton1.Image = (System.Drawing.Image)resources.GetObject("toolStripButton1.Image");
			toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
			toolStripButton1.Name = "toolStripButton1";
			toolStripButton1.Size = new System.Drawing.Size(36, 22);
			toolStripButton1.Text = "发包";
			toolStripButton1.Click += new System.EventHandler(toolStripButton1_Click_1);
			toolStripTextBox2.Font = new System.Drawing.Font("Microsoft YaHei UI", 9f);
			toolStripTextBox2.Name = "toolStripTextBox2";
			toolStripTextBox2.Size = new System.Drawing.Size(100, 25);
			toolStripTextBox2.Text = "公告内容";
			toolStripComboBox1.AutoSize = false;
			toolStripComboBox1.DropDownWidth = 75;
			toolStripComboBox1.IntegralHeight = false;
			toolStripComboBox1.Items.AddRange(new object[3]
			{
				"9",
				"10",
				"20"
			});
			toolStripComboBox1.Name = "toolStripComboBox1";
			toolStripComboBox1.Size = new System.Drawing.Size(40, 25);
			toolStripComboBox1.Text = "9";
			toolStripButton2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
			toolStripButton2.ForeColor = System.Drawing.Color.Black;
			toolStripButton2.Image = (System.Drawing.Image)resources.GetObject("toolStripButton2.Image");
			toolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta;
			toolStripButton2.Name = "toolStripButton2";
			toolStripButton2.Size = new System.Drawing.Size(60, 22);
			toolStripButton2.Text = "发送公告";
			toolStripButton2.Click += new System.EventHandler(toolStripButton2_Click_1);
			toolStripSeparator1.Name = "toolStripSeparator1";
			toolStripSeparator1.Size = new System.Drawing.Size(6, 25);
			toolStripButton3.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
			toolStripButton3.ForeColor = System.Drawing.Color.Black;
			toolStripButton3.Image = (System.Drawing.Image)resources.GetObject("toolStripButton3.Image");
			toolStripButton3.ImageTransparentColor = System.Drawing.Color.Magenta;
			toolStripButton3.Name = "toolStripButton3";
			toolStripButton3.Size = new System.Drawing.Size(60, 22);
			toolStripButton3.Text = "发送人数";
			toolStripButton3.Click += new System.EventHandler(toolStripButton3_Click_1);
			toolStripSeparator2.Name = "toolStripSeparator2";
			toolStripSeparator2.Size = new System.Drawing.Size(6, 25);
			toolStripButton4.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
			toolStripButton4.ForeColor = System.Drawing.Color.Black;
			toolStripButton4.Image = (System.Drawing.Image)resources.GetObject("toolStripButton4.Image");
			toolStripButton4.ImageTransparentColor = System.Drawing.Color.Magenta;
			toolStripButton4.Name = "toolStripButton4";
			toolStripButton4.Size = new System.Drawing.Size(24, 22);
			toolStripButton4.Text = "查";
			toolStripButton4.Click += new System.EventHandler(toolStripButton4_Click);
			GraphPanel.AutoScroll = true;
			GraphPanel.AutoSize = true;
			GraphPanel.BackColor = System.Drawing.Color.FromArgb(64, 64, 64);
			GraphPanel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
			GraphPanel.Dock = System.Windows.Forms.DockStyle.Fill;
			GraphPanel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
			GraphPanel.ForeColor = System.Drawing.Color.White;
			GraphPanel.Location = new System.Drawing.Point(0, 25);
			GraphPanel.Name = "GraphPanel";
			GraphPanel.Size = new System.Drawing.Size(697, 267);
			GraphPanel.TabIndex = 0;
			GraphPanel.Paint += new System.Windows.Forms.PaintEventHandler(GraphPanel_Paint);
			AutoScaleBaseSize = new System.Drawing.Size(6, 14);
			AutoScroll = true;
			BackColor = System.Drawing.SystemColors.Control;
			base.ClientSize = new System.Drawing.Size(697, 316);
			base.Controls.Add(GraphPanel);
			base.Controls.Add(toolStrip1);
			base.Controls.Add(statusBar1);
			ForeColor = System.Drawing.Color.Lime;
			base.Icon = (System.Drawing.Icon)resources.GetObject("$this.Icon");
			base.Menu = mainMenu1;
			base.Name = "Form1";
			Text = "江湖";
			base.FormClosing += new System.Windows.Forms.FormClosingEventHandler(Form1_FormClosing);
			base.Load += new System.EventHandler(Form1_Load);
			base.Layout += new System.Windows.Forms.LayoutEventHandler(Form1_Layout);
			((System.ComponentModel.ISupportInitialize)statusBarPanel1).EndInit();
			((System.ComponentModel.ISupportInitialize)statusBarPanel2).EndInit();
			((System.ComponentModel.ISupportInitialize)statusBarPanel3).EndInit();
			((System.ComponentModel.ISupportInitialize)statusBarPanel4).EndInit();
			toolStrip1.ResumeLayout(false);
			toolStrip1.PerformLayout();
			ResumeLayout(false);
			PerformLayout();
		}

		private void menuItem59_Click(object sender, EventArgs e)
		{
			world.SetDB首爆();
			world.SetDB首爆石头();
		}

		private void menuItem60_Click(object sender, EventArgs e)
		{
			world.SetDB自定义回收();
		}

		private void menuItem63_Click_1(object sender, EventArgs e)
		{
			BinIP binIP = new BinIP();
			binIP.ShowDialog();
		}

		private void menuItem43_Click_2(object sender, EventArgs e)
		{
			Form4 form = new Form4();
			form.ShowDialog();
		}

		private void menuItem54_Click_1(object sender, EventArgs e)
		{
			Form3 form = new Form3();
			form.ShowDialog();
			form.Dispose();
		}

		private void menuItem65_Click(object sender, EventArgs e)
		{
			SendItem sendItem = new SendItem();
			sendItem.ShowDialog();
		}

		private void menuItem66_Click(object sender, EventArgs e)
		{
			Form14 form = new Form14();
			form.ShowDialog();
		}

		private void menuItem67_Click(object sender, EventArgs e)
		{
			UserListbot userListbot = new UserListbot();
			userListbot.ShowDialog();
		}

		private void menuItem68_Click(object sender, EventArgs e)
		{
			爆率修改 爆率修改 = new 爆率修改();
			爆率修改.ShowDialog();
		}

		private void menuItem69_Click(object sender, EventArgs e)
		{
			if (World.记录说话 == 0)
			{
				World.记录说话 = 1;
				WriteLine(3, "记录说话开启！");
				menuItem69.Text = "显示说话结束";
				menuItem69.Checked = true;
			}
			else if (MessageBox.Show("记录说话进行中，是否结束？", "警告", MessageBoxButtons.YesNo) == DialogResult.Yes && World.记录说话 != 0)
			{
				World.记录说话 = 0;
				WriteLine(3, "记录说话结束！");
				menuItem69.Text = "显示说话开启";
				menuItem69.Checked = false;
			}
		}

		private void toolStripButton4_Click(object sender, EventArgs e)
		{
			try
			{
				foreach (MapClass value in World.Map.Values)
				{
					foreach (NpcClass value2 in value.npcTemplate.Values)
					{
						value2.getbl();
					}
				}
				foreach (组队Class value3 in World.W组队.Values)
				{
					WriteLine(2, "组队:" + value3.组队id.ToString() + "  人物：" + value3.组队列表.Count.ToString());
					foreach (Players value4 in value3.组队列表.Values)
					{
						WriteLine(2, "组队员:" + value4.Userid + "  人物：" + value4.UserName);
					}
				}
				foreach (Players value5 in World.allConnectedChars.Values)
				{
				}
				foreach (object item in World.locklist3)
				{
					WriteLine(10, item.ToString());
				}
			}
			catch (Exception ex)
			{
				WriteLine(1, ex.ToString());
			}
		}

		private void toolStripButton3_Click_1(object sender, EventArgs e)
		{
			复查用户登陆();
			WriteLine(10, "复查用户登陆 完成");
		}

		private void toolStripButton2_Click_1(object sender, EventArgs e)
		{
			try
			{
				foreach (Players value in World.allConnectedChars.Values)
				{
					value?.系统提示(toolStripTextBox2.Text, int.Parse(toolStripComboBox1.SelectedItem.ToString()), "系统信息");
				}
			}
			catch
			{
			}
		}

		private void toolStripButton1_Click_1(object sender, EventArgs e)
		{
			try
			{
				byte[] array = Converter.hexStringToByte2(toolStripTextBox1.Text);
				foreach (NetState value in World.list.Values)
				{
					if (value != null)
					{
						if (toolStripComboBox2.Text == "正常")
						{
							Buffer.BlockCopy(BitConverter.GetBytes(value.WorldId), 0, array, 5, 2);
							value.Send单包(array, array.Length);
							Send单包(array, array.Length);
						}
						else
						{
							value.Send多包(array, array.Length);
						}
					}
				}
			}
			catch
			{
			}
			aaa++;
		}

		private void menuItem70_Click(object sender, EventArgs e)
		{
			frmYBI frmYBI = new frmYBI();
			frmYBI.ShowDialog();
			frmYBI.Dispose();
		}

		private void menuItem71_Click(object sender, EventArgs e)
		{
			if (World.快速攻击监测 == 0)
			{
				World.快速攻击监测 = 1;
				WriteLine(10, "快速攻击监测开启！");
				menuItem71.Checked = true;
			}
			else if (MessageBox.Show("快速攻击监测进行中，是否结束？", "警告", MessageBoxButtons.YesNo) == DialogResult.Yes && World.快速攻击监测 != 0)
			{
				World.快速攻击监测 = 0;
				WriteLine(10, "快速攻击监测结束！");
				menuItem71.Checked = false;
			}
		}

		private void menuItem72_Click(object sender, EventArgs e)
		{
			Form5 form = new Form5();
			form.ShowDialog();
		}

		private void menuItem58_Click(object sender, EventArgs e)
		{
			Form13 form = new Form13();
			form.ShowDialog();
		}

		private void menuItem73_Click(object sender, EventArgs e)
		{
			Form6 form = new Form6();
			form.ShowDialog();
		}

		private void menuItem74_Click(object sender, EventArgs e)
		{
			SendGG sendGG = new SendGG();
			sendGG.ShowDialog();
		}

		private void menuItem75_Click(object sender, EventArgs e)
		{
			if (World.ykts == null)
			{
				World.ykts = new 异口同声();
				World.发送公告("异口同声活动已开启，请根据指引参与活动！");
				WriteLine(3, "异口同声开始");
				menuItem75.Text = "结束异口同声";
			}
			else if (MessageBox.Show("异口同声进行中，是否结束？", "警告", MessageBoxButtons.YesNo) == DialogResult.Yes && World.ykts != null)
			{
				World.ykts.Dispose();
				World.发送公告("异口同声活动已结束，感谢您的参与！");
				WriteLine(3, "异口同声结束");
				menuItem75.Text = "开启异口同声";
			}
		}

		private void menuItem76_Click(object sender, EventArgs e)
		{
			if (World.攻城 == null)
			{
				WriteLine(3, "自动攻城战开启成功");
				World.攻城 = new 攻城Class();
			}
			else
			{
				World.攻城战状态 = 0;
				World.攻城.Dispose();
				WriteLine(3, "攻城战结束");
			}
		}

		private void menuItem77_Click(object sender, EventArgs e)
		{
			if (World.eve == null)
			{
				World.eve = new EventClass(3);
				WriteLine(3, "3势力战开始！");
				menuItem77.Text = "关闭三势力战";
			}
			else
			{
				World.eve.Dispose();
				WriteLine(3, "3势力战结束！");
				menuItem77.Text = "开启三势力战";
			}
		}

		private void menuItem46_Click(object sender, EventArgs e)
		{
			if (World.eve == null)
			{
				World.eve = new EventClass(3);
				WriteLine(3, "4势力战开始！");
				menuItem46.Text = "关闭四势力战";
			}
			else
			{
				World.eve.Dispose();
				WriteLine(3, "4势力战结束！");
				menuItem46.Text = "开启四势力战";
			}
		}

		private void menuItem48_Click(object sender, EventArgs e)
		{
			if (World.门战进程 == 0)
			{
				if (World.门战 != null)
				{
					World.门战.Dispose();
					World.门战 = null;
				}
				World.门战 = new 帮派战_门战();
				WriteLine(3, "新门战开始！");
				menuItem48.Text = "结束新门战";
			}
			else if (MessageBox.Show("门战正在进行中确定要重结束么？", "警告", MessageBoxButtons.YesNo) == DialogResult.Yes)
			{
				if (World.门战 != null)
				{
					World.门战.Dispose();
					World.门战 = null;
				}
				WriteLine(3, "新门战结束！");
				menuItem48.Text = "开启新门战";
			}
		}

		private void menuItem24_Click_1(object sender, EventArgs e)
		{
			if (World.是否开启高倍经验 == 0)
			{
				World.是否开启高倍经验 = 1;
				World.发送公告(World.高倍经验倍数.ToString() + "倍经验开启！");
				WriteLine(3, "高倍经验开启！");
				menuItem24.Text = "高倍经验结束";
			}
			else if (MessageBox.Show("高倍经验进行中，是否结束？", "警告", MessageBoxButtons.YesNo) == DialogResult.Yes && World.是否开启高倍经验 != 0)
			{
				World.是否开启高倍经验 = 0;
				World.发送公告(World.高倍经验倍数.ToString() + "倍经验结束！");
				WriteLine(3, "高倍经验结束！");
				menuItem24.Text = "高倍经验开启";
			}
		}

		private void menuItem33_Click(object sender, EventArgs e)
		{
			if (World.Luandou == null)
			{
				World.Luandou = new 无限乱斗();
				WriteLine(3, "排位赛开始");
			}
			else
			{
				World.Luandou.Dispose();
				WriteLine(3, "排位赛结束");
			}
		}

		private void menuItem56_Click(object sender, EventArgs e)
		{
			if (World.活动副本状态 == 0)
			{
				World.活动副本状态 = 1;
				World.发送公告(World.活动副本开启公告内容);
				WriteLine(3, "活动副本已开启");
			}
			else
			{
				World.活动副本状态 = 0;
				World.发送公告(World.活动副本结束公告内容);
				WriteLine(3, "活动副本已关闭");
			}
		}

		private void menuItem78_Click(object sender, EventArgs e)
		{
			if (World.科举 == null)
			{
				World.科举 = new 科举系统();
				WriteLine(3, "科举开始");
				World.得分清零();
				DBA.ExeSqlCommand("update TBL_人物数据 set 得分统计=0,答案选择='0' where (ID>=0)", "GameServer");
				menuItem78.Text = "科举结束";
			}
			else
			{
				World.科举.Dispose();
				WriteLine(3, "科举结束");
				menuItem78.Text = "科举开启";
			}
		}

		private void menuItem79_Click(object sender, EventArgs e)
		{
			if (World.幸运奖 == null)
			{
				World.幸运奖 = new StarClass();
				WriteLine(3, "幸运奖开始");
				menuItem79.Text = "幸运奖关闭";
			}
			else
			{
				World.幸运奖.Dispose();
				WriteLine(3, "幸运奖结束");
				menuItem79.Text = "幸运奖开启";
			}
		}

		private void menuItem36_Click(object sender, EventArgs e)
		{
			if (World.BOSS进程秒 == 0)
			{
				world.世界BOSS开启();
				WriteLine(3, "开启世界BOSS");
			}
		}

		private void menuItem82_Click_1(object sender, EventArgs e)
		{
			if (World.eve == null)
			{
				World.eve = new EventClass();
				World.势力战进程 = 0;
				World.势力战时间 = 0;
				World.势力战正分数 = 0;
				World.势力战邪分数 = 0;
				World.势力战正人数 = 0;
				World.势力战邪人数 = 0;
				DBA.ExeSqlCommand("DELETE   FROM   EventTop");
				WriteLine(2, "势力战开启了");
			}
			else
			{
				World.eve.Dispose();
				foreach (Players value in World.allConnectedChars.Values)
				{
					if (value.人物坐标_地图 == 801 && value.假人是否参与势力战 == 0)
					{
						value.势力战临时正邪值 = 0;
						value.发送势力战开始倒计时(0);
						value.移动(RNG.Next(450, 550), RNG.Next(1700, 1800), 15f, 101);
					}
				}
				WriteLine(2, "势力战关闭了");
			}
		}

		private void menuItem61_Click(object sender, EventArgs e)
		{
			F假人设置 f假人设置 = new F假人设置(T);
			f假人设置.Show();
		}

		private void menuItem80_Click(object sender, EventArgs e)
		{
			world.加载假人商店物品列表();
		}

		private void menuItem81_Click(object sender, EventArgs e)
		{
			world.加载假人喊话内容();
		}

		private void menuItem82_Click(object sender, EventArgs e)
		{
			world.加载假人怪物坐标();
		}

		private void menuItem64_Click(object sender, EventArgs e)
		{
			WriteLine(3, "万鑫江湖-打造精品");
			ParameterizedThreadStart start = 自动存档线程;
			Thread thread = new Thread(start);
			thread.Start();
		}

		private void statusBar1_PanelClick(object sender, StatusBarPanelClickEventArgs e)
		{
		}
	}
}
